//
//  NavigationController.m
//  新闻
//
//  Created by gyh on 15/9/21.
//  Copyright © 2015年 apple. All rights reserved.
//

#import "NavigationController.h"
#import "UIBarButtonItem+gyh.h"
#import "NightModeHandle.h"
@interface NavigationController ()

@end

@implementation NavigationController


- (void)viewDidLoad {
    [super viewDidLoad];
   
//        [[UINavigationBar appearance]setBarTintColor:[UIColor colorWithRed:0.898 green:0.063 blue:0.000 alpha:1.000]];
    
    
   
    
    
    
}

#pragma mark  拦截push，一旦进入下个视图，隐藏tabbar，自定义返回按钮
-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    
    if (self.viewControllers.count) {
        viewController.hidesBottomBarWhenPushed = YES;
        viewController.navigationItem.leftBarButtonItem = [UIBarButtonItem ItemWithIcon:@"iconfont-fanhui_meitu_1" highIcon:nil target:self action:@selector(back)];
        
        
    }
    [super pushViewController:viewController animated:animated];
    
    
}

- (void)back
{
    [self popViewControllerAnimated:YES];

}


@end
